$(function () {
    $("#updateBtn").click(function (e) {
        const userPass = $("#old-password").val()
        const newPass = $("#new-password").val()
        const confirmPass = $("#try-password").val()

        const passObj = {
            userPass,
            newPass,
            confirmPass,
        }
        $.ajax(`${baseUrl}/users/password`, {
            type: "put",
            data: passObj,
            success: function (res) {
                alert("修改成功")
            },
            error: function (err) {
                console.log(err)
            },
        })
    })
})
